package com.example.backend.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultMessage {
    private Integer code;
    private String message;
    private Object data;

    public static  ResultMessage success(Object data,String message) {
        return new ResultMessage(200, message,data);
    }
    public static ResultMessage error(String message) {
        return new ResultMessage(500, message, null);
    }
}
